import sqlite3

conn = sqlite3.connect('test.db')
curs = conn.cursor()

# 创建表
# curs.execute('''
#     create table person(
#         id INTEGER PRIMARY KEY,
#         name TEXT,
#         age INTEGER
#     )
# ''')

# 插入数据
# query = 'insert into person values (2, "张三", 11)'
# curs.execute(query)

query = 'select * from person'
curs.execute(query)
for row in curs.fetchall():
    print(row)

conn.commit()
conn.close()


